<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>S110_nRF51822/Board/nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('nrf6310__nrf2752_2ble_2ble__app__hids__mouse_2main_8c.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">S110_nRF51822/Board/nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br/>
<code>#include &lt;string.h&gt;</code><br/>
<code>#include &quot;<a class="el" href="nordic__common_8h_source.html">nordic_common.h</a>&quot;</code><br/>
<code>#include &quot;nrf.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="nrf__assert_8h_source.html">nrf_assert.h</a>&quot;</code><br/>
<code>#include &quot;nrf_error.h&quot;</code><br/>
<code>#include &quot;nrf_gpio.h&quot;</code><br/>
<code>#include &quot;nrf51_bitfields.h&quot;</code><br/>
<code>#include &quot;ble.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__srv__common_8h_source.html">ble_srv_common.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__advdata_8h_source.html">ble_advdata.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__hids_8h_source.html">ble_hids.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__bas_8h_source.html">ble_bas.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__dis_8h_source.html">ble_dis.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__conn__params_8h_source.html">ble_conn_params.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__nrf6310__pins_8h_source.html">ble_nrf6310_pins.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__sensorsim_8h_source.html">ble_sensorsim.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="app__scheduler_8h_source.html">app_scheduler.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__stack__handler_8h_source.html">ble_stack_handler.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="app__timer_8h_source.html">app_timer.h</a>&quot;</code><br/>
</div>
<p><a href="nrf6310__nrf2752_2ble_2ble__app__hids__mouse_2main_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga18f0a464922f55c4aa363355339c826b">LEFT_BUTTON_PIN_NO</a>&#160;&#160;&#160;NRF6310_BUTTON_0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga486b52e642e9037f8cf45e42d55cd4d3">RIGHT_BUTTON_PIN_NO</a>&#160;&#160;&#160;NRF6310_BUTTON_1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gac7f995031d04c977e9a0feecd0a93a01">UP_BUTTON_PIN_NO</a>&#160;&#160;&#160;NRF6310_BUTTON_2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga413770639a3b71b19ed878b25e0aacd0">DOWN_BUTTON_PIN_NO</a>&#160;&#160;&#160;NRF6310_BUTTON_3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga5f5a2c9450ebc584b4fe743c6b1a280b">DEVICE_NAME</a>&#160;&#160;&#160;&quot;NORDIC_MOUSE_0.1&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaaa2b8f5b105c3019df0cb346f472e803">MANUFACTURER_NAME</a>&#160;&#160;&#160;&quot;NordicSemiconductor&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaf28f0232a3fdc0eb03b94eb34b25cde8">BATTERY_LEVEL_MEAS_INTERVAL</a>&#160;&#160;&#160;2000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga59eb06cba38be11278ebd2829e95bc26">MIN_BATTERY_LEVEL</a>&#160;&#160;&#160;81</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga16896fb7a69ca90a4a4e341d5a888002">MAX_BATTERY_LEVEL</a>&#160;&#160;&#160;100</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga69eef02165834e4dabc5757b82dddbf1">BATTERY_LEVEL_INCREMENT</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gadcf82f097b1063d2184008f34044d6f8">PNP_ID_VENDOR_ID_SOURCE</a>&#160;&#160;&#160;0x02</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gac294f76c25d54a7144acb2d839f05785">PNP_ID_VENDOR_ID</a>&#160;&#160;&#160;0x1915</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga136d0bff35b1ea2dcf2889f6f700971d">PNP_ID_PRODUCT_ID</a>&#160;&#160;&#160;0xEEEE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga6778c118c0d9848c00ceeb23759aec6f">PNP_ID_PRODUCT_VERSION</a>&#160;&#160;&#160;0x0001</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gadde0b932e57e128e4cd81c2dca47cfe3">APP_ADV_INTERVAL</a>&#160;&#160;&#160;64</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaf58371bad8e1be8e2323df60379ed2df">APP_ADV_TIMEOUT_IN_SECONDS</a>&#160;&#160;&#160;180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga95196d5d0f40cf195a6001955d6d98cf">MIN_CONN_INTERVAL</a>&#160;&#160;&#160;6</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga7d868ed8adb7d475b463fd8855907a18">MAX_CONN_INTERVAL</a>&#160;&#160;&#160;12</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga0c921a874ac37870fc1516ce66cd228a">SLAVE_LATENCY</a>&#160;&#160;&#160;20</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga799412c2b531ca347e13611e6e7523b9">CONN_SUP_TIMEOUT</a>&#160;&#160;&#160;(3 * 100)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga9952b3ba417af1b9c1aa236ec5e6d1e8">FIRST_CONN_PARAM_UPDATE_DELAY</a>&#160;&#160;&#160;(5 * 1000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gafb9287e2b49bd5efdaf2073ad1e9f8e3">NEXT_CONN_PARAM_UPDATE_DELAY</a>&#160;&#160;&#160;(30 * 1000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga549292ede080254fde7020245f268ed8">MAX_CONN_PARAM_UPDATE_COUNT</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga7c1fffb0f865552108560d4c63b32db1">SEC_PARAM_TIMEOUT</a>&#160;&#160;&#160;60</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gacbf03a82593c273743a5a80a1119b851">SEC_PARAM_BOND</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gab6831ebe113f8afe970326b7742b5947">SEC_PARAM_MITM</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga42df85b3a4083cdc614d9111d580d98f">SEC_PARAM_IO_CAPABILITIES</a>&#160;&#160;&#160;BLE_GAP_IO_CAPS_NONE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaee13a0d0077f423fa0edd74e17fb6b88">SEC_PARAM_OOB</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga6b7b2e2f67fbf790f55b46f8f5e24ad5">SEC_PARAM_MIN_KEY_SIZE</a>&#160;&#160;&#160;7</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaf2cd1595de153ea1d6d843619a1a7707">SEC_PARAM_MAX_KEY_SIZE</a>&#160;&#160;&#160;16</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga8abf91f285c510ce8f0e664198252f42">MOVEMENT_SPEED</a>&#160;&#160;&#160;5</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga80ad1cf793ed540c1e7654bc791e970b">INPUT_REPORT_COUNT</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga91d582a48340c2735ea67349b8125772">INPUT_REP_BUTTONS_LEN</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga63ab6b5d3226b98bf5ab9976884787bf">INPUT_REP_MOVEMENT_LEN</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga674e8bccaa8e6e279022338b3a07ca77">INPUT_REP_MEDIA_PLAYER_LEN</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaac6739906efb31d778b6f033d9c86cb7">INPUT_REP_BUTTONS_INDEX</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga3e9a1505436db2abe4a32f39cbd9bc24">INPUT_REP_MOVEMENT_INDEX</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaa68549c4bc68356de4c35ff3f1ecda64">INPUT_REP_MPLAYER_INDEX</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga71c7215668ec384589a0f46f63eaf4e8">INPUT_REP_REF_BUTTONS_ID</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gabdf90743eb83c79bc8ea68be3622ffd3">INPUT_REP_REF_MOVEMENT_ID</a>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga5aafc646da1e1dcde448233056821bcf">INPUT_REP_REF_MPLAYER_ID</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga86d9879e1f1e698d670d31c933e5fe95">BASE_USB_HID_SPEC_VERSION</a>&#160;&#160;&#160;0x0101</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaacd557e6bc45d33880a272b051f7684e">on_hids_evt</a> (<a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a> *p_hids, <a class="el" href="structble__hids__evt__t.html">ble_hids_evt_t</a> *p_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">HID event handler.  <a href="group__ble__sdk__app__hids__mouse__main.html#gaacd557e6bc45d33880a272b051f7684e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gadec561788a76b8a63ad9663625a25d78">assert_nrf_callback</a> (uint16_t line_num, const uint8_t *file_name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assert macro callback function.  <a href="group__ble__sdk__app__hids__mouse__main.html#gadec561788a76b8a63ad9663625a25d78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga54ab546c90d69e5fc9cfee653024ea53">service_error_handler</a> (uint32_t nrf_error)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Service error handler.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga54ab546c90d69e5fc9cfee653024ea53"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab155022684d4acfd98218c3799822e74"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::battery_level_update" ref="gab155022684d4acfd98218c3799822e74" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gab155022684d4acfd98218c3799822e74">battery_level_update</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform battery measurement, and update Battery Level characteristic in Battery Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga7e5b3d2cf024dde83b8c536b22a1c155">battery_level_meas_timeout_handler</a> (app_timer_id_t timer_id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Battery measurement timer timeout handler.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga7e5b3d2cf024dde83b8c536b22a1c155"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga0892e076b365fc49b55bd0f90ab09222">leds_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">LEDs initialization.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga0892e076b365fc49b55bd0f90ab09222"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga09658aaa0774820d8f25249d551bc283">timers_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Timer initialization.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga09658aaa0774820d8f25249d551bc283"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga1004973353f351806e42896c491a5ab2">gap_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GAP initialization.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga1004973353f351806e42896c491a5ab2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga935c9624de0709fe228dbefa4b54de48">advertising_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Advertising functionality initialization.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga935c9624de0709fe228dbefa4b54de48"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga2d0743f12929b17b64c5c2fb101a9350"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::dis_init" ref="ga2d0743f12929b17b64c5c2fb101a9350" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga2d0743f12929b17b64c5c2fb101a9350">dis_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Device Information Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga46507354f43dd16b32281f032e29d9c5"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::bas_init" ref="ga46507354f43dd16b32281f032e29d9c5" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga46507354f43dd16b32281f032e29d9c5">bas_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Battery Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga1469fa1057d51643d5b64abadf23e135"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::hids_init" ref="ga1469fa1057d51643d5b64abadf23e135" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga1469fa1057d51643d5b64abadf23e135">hids_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize HID Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5b27b40e18af00d43b92f57eaed0e9b2"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::services_init" ref="ga5b27b40e18af00d43b92f57eaed0e9b2" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga5b27b40e18af00d43b92f57eaed0e9b2">services_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize services that will be used by the application. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6f75e3fe8d4ed6400f9429987dee0f3e"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::sensor_sim_init" ref="ga6f75e3fe8d4ed6400f9429987dee0f3e" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga6f75e3fe8d4ed6400f9429987dee0f3e">sensor_sim_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the battery sensor simulator. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9f11118fb9ce22ad1afe20af6f89b131"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::sec_params_init" ref="ga9f11118fb9ce22ad1afe20af6f89b131" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga9f11118fb9ce22ad1afe20af6f89b131">sec_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize security parameters. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga4538ed130db3bf7fc68b76a4d9e032fa">conn_params_error_handler</a> (uint32_t nrf_error)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Connection Parameters module error handler.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga4538ed130db3bf7fc68b76a4d9e032fa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf61b6c1c47f5c96b169ff81c345d7849"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::conn_params_init" ref="gaf61b6c1c47f5c96b169ff81c345d7849" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaf61b6c1c47f5c96b169ff81c345d7849">conn_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the Connection Parameters module. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab7e1400dcd1b0f9470d20af86077ba74"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::timers_start" ref="gab7e1400dcd1b0f9470d20af86077ba74" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gab7e1400dcd1b0f9470d20af86077ba74">timers_start</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start timers. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gadf80cd84ee702e57a2a416fe4f653eb8"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::advertising_start" ref="gadf80cd84ee702e57a2a416fe4f653eb8" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gadf80cd84ee702e57a2a416fe4f653eb8">advertising_start</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start advertising. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gad083cb3569230d7ecbf2d01ef2a2c1d9">on_ble_evt</a> (<a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application's BLE Stack event handler.  <a href="group__ble__sdk__app__hids__mouse__main.html#gad083cb3569230d7ecbf2d01ef2a2c1d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaa1927dfd1c321164f2f34ae9ad95a77d">ble_evt_dispatch</a> (app_sched_event_data_t *p_ev_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dispatches a BLE stack event to all modules with a BLE stack event handler.  <a href="group__ble__sdk__app__hids__mouse__main.html#gaa1927dfd1c321164f2f34ae9ad95a77d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gacf1716b2e00b3456f0733e8101ed9e0d">ble_evt_schedule</a> (<a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Pass bluetooth stack event to scheduler.  <a href="group__ble__sdk__app__hids__mouse__main.html#gacf1716b2e00b3456f0733e8101ed9e0d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaa06a7a39e83ec4cf3553f4ed6ba6323a">ble_stack_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">BLE stack initialization.  <a href="group__ble__sdk__app__hids__mouse__main.html#gaa06a7a39e83ec4cf3553f4ed6ba6323a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga1b3a805592966451c4dff7cee63c6378">mouse_movement_send</a> (int16_t x_delta, int16_t y_delta)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Function to send Mouse Movement.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga1b3a805592966451c4dff7cee63c6378"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaa3977e6f27ec95f12d2f060ef920a29d">mouse_event_handler</a> (app_sched_event_data_t *p_ev_data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Mouse event handler.  <a href="group__ble__sdk__app__hids__mouse__main.html#gaa3977e6f27ec95f12d2f060ef920a29d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga6d0508a032b45031ee39fc3155944d7e">mouse_event_schedule</a> (int16_t x_delta, int16_t y_delta)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Passes a mouse event to the Scheduler.  <a href="group__ble__sdk__app__hids__mouse__main.html#ga6d0508a032b45031ee39fc3155944d7e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga26b108e2296d5514a2391960b4231d71"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::GPIOTE_IRQHandler" ref="ga26b108e2296d5514a2391960b4231d71" args="(void)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga26b108e2296d5514a2391960b4231d71">GPIOTE_IRQHandler</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GPIOTE interrupt handler. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga265c25c068555fbfae4ab4f391060040"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::buttons_init" ref="ga265c25c068555fbfae4ab4f391060040" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga265c25c068555fbfae4ab4f391060040">buttons_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize GPIOTE module for detecting buttons. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3adda2642702fdb99b08992c39494000"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::power_manage" ref="ga3adda2642702fdb99b08992c39494000" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga3adda2642702fdb99b08992c39494000">power_manage</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Power manager. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga840291bc02cba5474a4cb46a9b9566fe"></a><!-- doxytag: member="nrf6310_nrf2752/ble/ble_app_hids_mouse/main.c::main" ref="ga840291bc02cba5474a4cb46a9b9566fe" args="(void)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application main function. <br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ble__sdk__srv__hids.html#ga7038aff3f095043b34e0a1403dd4ebcc">ble_hids_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga39dca3cc11120abf5cbc751bb69d5df0">s_hids</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ble__sdk__srv__bas.html#gaea81f98230816bcfcbfd6ccbb4db3999">ble_bas_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gab22f840926bbada5a0ba32f2f7dc94b3">s_bas</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__gap__sec__params__t.html">ble_gap_sec_params_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#ga738ed84e141ba1059dd1318dc425343c">s_sec_params</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gade286b62fde8822965f1e5740a2e9544">s_in_boot_mode</a> = false</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__sensorsim__cfg__t.html">ble_sensorsim_cfg_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaa752585d9b405d6e0c6fd392d7f64b59">s_battery_sim_cfg</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__sensorsim__state__t.html">ble_sensorsim_state_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__hids__mouse__main.html#gaa51f5fc284e1b7e1570ab742fa9b63f3">s_battery_sim_state</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition in file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__hids__mouse_2main_8c_source.html">main.c</a>.</p>
</div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="nrf6310__nrf2752_2ble_2ble__app__hids__mouse_2main_8c.html">main.c</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
